home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4194 < prev    next >
Encoding:
Text File  |  1996-08-05  |  912 b   |  42 lines

  1. Path: news.ov.com!news
  2. From: glenn@ov.com (Fletcher.Glenn@ov.com)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: EOF error
  5. Date: 2 Feb 1996 18:00:18 GMT
  6. Organization: OpenVision
  7. Message-ID: <4etjfi$mdv@spanky.pls.ov.com>
  8. References: <4eo12b$om3@newsbf02.news.aol.com>
  9. Reply-To: glenn@ov.com
  10. NNTP-Posting-Host: foghorn.pls.ov.com
  11.  
  12. In article om3@newsbf02.news.aol.com, polver@aol.com (Polver) writes:
  13. >Why doesn't the following work.
  14. >I'm using a unix system at school.
  15. >
  16. >#include <stdio.h>
  17. >
  18. >main()
  19. >{
  20. >    int c;
  21. >
  22. >    c = getchar();
  23. >    while (c != EOF) {
  24. >        putchar(c);
  25. >        c = getchar(c);
  26.                      ^
  27. Except for the above character, the program compiled and ran
  28. on my SunOS system, even using the ANSI compiler.
  29.  
  30.             Fletcher.Glenn@ov.com
  31. >    }
  32. >}
  33. >
  34. >I keep getting an error about EOF undefined ar not scalar or something.
  35. >You can reply here or at pmarti01@hills.ccsf.cc.ca.us
  36. >Thanks.
  37.  
  38.  
  39.  
  40.  
  41.  
  42.